#!/bin/bash

# 
# POPFile configuration tools v1.0
# Author: Valentin Clement
# Creation Date: 05.29.2012
# Descritpion: This script helps the developer to find the right flags for compilation or run with POPFile library
# 

POPC_DEFAULT_LOCATION="/usr/local/popc"

if [ -n "${POPC_LOCATION:+x}" ]
	then
		POPC_DEFAULT_LOCATION="/usr/local/popc"
	else
		POPC_DEFAULT_LOCATION=$POPC_LOCATION
fi


if [ $# -eq 0 ]
then
	echo -I$POPC_DEFAULT_LOCATION/include -L$POPC_DEFAULT_LOCATION/lib -lpopfile
else 
	if [ $1 == "--libs" ]
	then
		echo -L$POPC_DEFAULT_LOCATION/lib -lpopfile
	elif [ $1 == "--include" ]
	then
		echo -I$POPC_DEFAULT_LOCATION/include
	elif [ $1 == "--objmap" ]
	then
		echo $POPC_DEFAULT_LOCATION/objects/objmap		
	else
		echo "Usage: $0 [--libs|--include]"
	fi
fi
